package com.joshondesign.sdljava.gfx;

/**
 * Created by IntelliJ IDEA.
 * User: josh
 * Date: 9/6/11
 * Time: 10:04 AM
 * To change this template use File | Settings | File Templates.
 */
public class Rect extends Node {
    private int x;
    private int y;
    private int w;
    private int h;
    private SColor color;

    public Rect(int x, int y, int w, int h, SColor color) {
        this.x = x;
        this.y = y;
        this.w = w;
        this.h = h;
        this.color = color;

    }

    public void draw(GFX gfx) {
        gfx.setPaint(color);
        gfx.fillRect(x,y,w,h);
    }

    public void setX(double x) {
        this.x = (int) x;
    }
}
